package com.game.client.service.logichandler;

import com.game.client.service.handler.GameClientChannelContext;
import com.game.netty.game.message.FirstMsgResponse;
import com.game.netty.game.message.SecondMsgResponse;
import com.game.netty.game.messagedispatcher.GameMessageHandler;
import com.game.netty.game.messagedispatcher.GameMessageMapping;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@GameMessageHandler
public class TestMessageHandler {
    private Logger logger = LoggerFactory.getLogger(TestMessageHandler.class);
    @GameMessageMapping(FirstMsgResponse.class)
    public void firstMessage(FirstMsgResponse response, GameClientChannelContext ctx) {
        logger.info("收到服务器响应:{}",response.getServerTime());
    }
    @GameMessageMapping(SecondMsgResponse.class)
    public void secondMessage(SecondMsgResponse response, GameClientChannelContext ctx) {
        logger.info("second msg response :{}",response.getBodyObj().getResult1());
    }
}
